<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../../css/app.css">
    <link rel="stylesheet" type="text/css" href="../../../css/tabBar.css">
    <link rel="stylesheet" type="text/css" href="../comm/buy_comm.css"/>
    <link rel="stylesheet" type="text/css" href="./css/order.css">
    <title>订单详情</title>
    <style type="text/css">
    	.order-goods{
    		margin: 0 0 60px;
    	}
      [v-clack]{
        display: none !important
      }
    </style>
</head>

<body>
	<div class="header navigationBar">
      	<div class="wrapper">
          	<span id="btn-back" class="header-btn left-btn backtrack"></span>
          	<span class="title">确认订单</span>
      	</div>
  	</div>
  	<div class="container top-container" v-if="list != ''" v-clack>
  		<div class="order-address">
  			<p class="" v-if="list.address == ''" @click="goOrderAddressAdd">
  				<img src="../../../image/shop/buy/buy-03.png"/>暂无收货地址，立即添加
  			</p>
  			<div v-if="list.address != ''" @click="orderAddressSelect"  :data-addressid="list.address.address_id || list.address.id">
  				<h2><b v-html="'收货人：'+list.address.name"></b><span v-html="list.address.phone"></span></h2>
  				<p v-html="'收货地址：'+list.address.province + list.address.city + list.address.district + list.address.address"></p>
  				<img src="../../../image/shop/buy/buy-16.png"/>
  			</div>
  			<img src="../../../image/shop/buy/buy-15.png"/>
  		</div>
  		<div class="order-goods" ref="orderGoodsFather">
  			<div class="order-goods-list" v-for="(item,index) in list.shop_list" :data-orderid="item.id">
	  			<h2>
	  				<img src="../../../image/shop/buy/buy-17.png"/> <span v-html="item.shop_name"></span>
	  			</h2>
	  			<div class="order-goods-detail" v-for="goods in item.goods_list" :data-goodsid="goods.goods_id" @click="goGoodsDetail" :data-group="goods.group_booking">
		  			<div>
		  				<img :src="goods.cover+'?x-oss-process=image/resize,m_lfit,w_960'"/>
		  			</div>
		  			<h3 v-html="goods.goods_name"></h3>
		  			<span v-html="'型号：'+goods.option_name"></span>
		  			<!--<p v-if="buy_now">
		  				<b v-html="'¥'+goods.group_price"></b><i v-html="'x'+goods.quantity"></i>
		  			</p>-->
		  			<p>
		  				<b v-html="'¥'+goods.price"></b><i v-html="'x'+goods.quantity"></i>
		  			</p>
	  			</div>
	  			<div class="order-goods-msg order-goods-dir order-goods-coupon" v-if="item.coupon_list.length > 0" @click="orderUseCoupon"  :data-index="index" :data-shopcode="item.shop_code"
	  				:data-data="item.coupon_list.length > 0 ? JSON.stringify(item.coupon_list) : 'null'" :data-couponid="item.coupon_list[0].coupon_discount_id || 0"><!--  -->
	  				<span>店铺优惠</span>
	  				<p v-html="'省'+item.coupon_list[0].amount+'元，店铺活动'"></p>
	  			</div>
	  			<div class="order-goods-msg order-goods-dir" style="display: none;">
	  				<span>配送方式</span>
	  				<p>请选择</p>
	  			</div>
	  			<div class="order-goods-msg">
	  				<span>买家留言</span>
		  			<input type="text" class="shop-msg-txt" name="" id="" value="" :data-name="item.shop_name" :data-shopcode="item.shop_code" placeholder="请输入留言" />
	  			</div>
	  			<div class="order-goods-small">
	  				共<i v-html="item.goods_num"></i>件商品，小计：
	  				<!--<template v-if="buy_now">
	  					<span class="shopTotalMoney" :data-money="item.goods_amount" v-html="'¥'+item.goods_amount.toFixed(2)"></span>
  					</template>
  					<template v-else="">-->
  						<span class="shopTotalMoney" v-if="item.coupon_list.length <= 0"  :data-money="item.goods_amount" v-html="'¥'+item.goods_amount.toFixed(2)"></span>
  						<span class="shopTotalMoney" v-else="" :data-money="item.goods_amount"
  							v-html="'¥'+(item.goods_amount - (+item.coupon_list[0].amount) > 0 ? item.goods_amount - (+item.coupon_list[0].amount) : 0).toFixed(2)"></span>
  					<!--</template>-->
	  			</div>
  			</div>
  		</div>
  		<ul class="order-number-money" style="display: none;">
  			<li>
  				<span>匿名购买</span> <div><input type="checkbox" name="" value="" class="aui-checkbox"/></div>
  			</li>
  		</ul>
  		<div class="order-detail-btn">
  			合计：<b v-html="'¥'+(list.goods_total_amount-goodsMoney > 0 ? list.goods_total_amount-goodsMoney : 0).toFixed(2)" :data-money="list.goods_total_amount" id="orderTotalMoney"></b>
  			<a href="javascript:void(0)" @click="goCreateOrderSubmit">提交订单</a>
  		</div>
  		<div class="order-coupon-select order-pop" ref="shopCouponList" data-name="优惠券选择" style="display: none;">
  			<div class="order-pop-bg" @click="closeSelectCoupon"></div>
  			<div class="order-pop-main">
  				<h2>店铺优惠</h2>
  				<ul :class="is_group ? 'order-group' : ''" v-if="couponList != ''">
  					<li v-for="(item,index) in couponList"  @click="orderSelectCoupon" :data-couponid="item.coupon_discount_id" :data-money="item.amount" :data-index="index">
  						<span v-html="'满减'+item.amount"></span>
  						<input type="radio" name="coupon" class="aui-radio" :checked=" index == couponIndex? 'checked' : ''" value="" /></li>
  					<li data-money="0" @click="orderSelectCoupon" :data-index="couponList.length" data-couponid="null">
  						<span>不使用优惠</span>
  						<input type="radio" name="coupon":checked="couponList.length == couponIndex? 'checked' : ''" class="aui-radio" value="" /></li>
  				</ul>
  				<a href="javascript:void(0);" :class="is_group ? 'order-group-btn' : ''"  @click="closeSelectCoupon">关闭</a>
  			</div>
  		</div>
  		<div class="order-send-way" data-name="发送方式选择">

  		</div>
  	</div>
</body>
<script src="../../sea.js" data-main="../../main"></script>
<script type="text/javascript" src="../../vue.js"></script>
<script type="text/javascript" src="./js/order.js"></script>
</html>
